﻿@model IEnumerable<BB.Apostas.Models.Noticia>


<h2>Lista de Noticias</h2>
<p>
    @Html.ActionLink("Voltar", "Index")
</p>
<p>
    @Html.ActionLink("Nova Noticia", "CreateNoticia")
</p>

<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Id)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Message)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Date)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Id)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Message)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Date)
            </td>
            <td>
                @Html.ActionLink("Editar", "EditNoticia", new { id = item.Id }) |         
            @Html.ActionLink("Remover", "DeleteNoticia", new { id = item.Id })
            </td>
        </tr>
    }

</table>
